package com.cn.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

/**
    * 购物车
    */
@ApiModel(value="com-cn-pojo-ShoppingCart")
@Data
@AllArgsConstructor
@NoArgsConstructor
@ToString
@TableName(value = "shopping_cart")
public class ShoppingCart {
    /**
     * 主键
     */
    @TableId(value = "id", type = IdType.AUTO)
    @ApiModelProperty(value="主键")
    private Long id;

    /**
     * 用户OpenId主键
     */
    @TableField(value = "user_id")
    @ApiModelProperty(value="用户OpenId主键")
    private String userId;

    @TableField(exist = false)
    @ApiModelProperty(value="菜品名称")
    private String name;


    @TableField(exist = false)
    @ApiModelProperty(value="菜品照片")
    private String image;

    @TableField(exist = false)
    @ApiModelProperty(value="菜品状态")
    private Integer status;
    /**
     * 菜品id
     */
    @TableField(value = "dish_id")
    @ApiModelProperty(value="菜品id")
    private Long dishId;

    /**
     * 数量
     */
    @TableField(value = "number")
    @ApiModelProperty(value="数量")
    private Integer number;

    /**
     * 金额
     */
    @TableField(value = "amount")
    @ApiModelProperty(value="金额")
    private BigDecimal amount;

    /**
     * 创建时间
     */
    @TableField(value = "create_time")
    @ApiModelProperty(value="创建时间")
    private Date createTime;

    /**
     * 规格json
     */
    @TableField(value = "flavor")
    @ApiModelProperty(value="规格json")
    private String flavor;

    @TableField(value = "checked")
    @ApiModelProperty(value="checked")
    private Integer checked;

    @TableField(exist = false)
    @ApiModelProperty(value="微信号")
    private String nickName;

    @ApiModelProperty(value = "口味")
    private Boolean selects;
//    private List<DishFlavor> flavor;
//    public static class DishFlavor {
//        public String name;
//        public String value;
//    }
    public static final String COL_ID = "id";

    public static final String COL_USER_ID = "user_id";

    public static final String COL_DISH_ID = "dish_id";

    public static final String COL_NUMBER = "number";

    public static final String COL_AMOUNT = "amount";

    public static final String COL_CREATE_TIME = "create_time";

    public static final String COL_FLAVOR = "flavor";
}